Skip to content

fix(typegen): restore field rows visibility in metadata fields dialog#182

Merged
eluce2 merged 1 commit intoproofsh:mainfrom
chriscors:fix/typegen-fields-dialog-height
Mar 19, 2026
Merged

fix(typegen): restore field rows visibility in metadata fields dialog#182
eluce2 merged 1 commit intoproofsh:mainfrom
chriscors:fix/typegen-fields-dialog-height

Conversation

@chriscors
Copy link
Copy Markdown
Collaborator

@chriscors chriscors commented Mar 19, 2026

Summary

  • Fixed field rows not displaying in the metadata fields dialog (regression from 8ca7a1e)
  • The previous overflow fix changed scroll container height from 650px to 100%, but contain: strict requires an explicit resolved height — height: 100% couldn't resolve through the CSS grid parent chain, collapsing the container to 0px
  • Uses viewport-based calc(90vh - 280px) height instead, derived from the dialog's max-h-[90vh] minus header/search/settings
  • Removed border-t on the settings form that visually collided with the data grid's bottom border

Test plan

  • Open the typegen web UI and click "Configure" on any table
  • Verify field rows are visible in the dialog
  • Verify the settings form below the table has no double-border artifact
  • Verify scrolling works correctly with many fields
  • Test on different viewport sizes to ensure the calc-based height is reasonable

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Style
    • Adjusted data grid container height calculation for improved scrolling behavior
    • Modified form styling with updated spacing and visual elements

The previous overflow fix (8ca7a1e) changed the scroll container from a
fixed 650px height to height: 100%, but contain: strict requires an
explicit resolved height — height: 100% couldn't resolve through the
grid parent chain, collapsing the container to 0px. Use a viewport-based
calc() height instead. Also remove the border-t on the settings form
that was visually colliding with the data grid's bottom border.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 19, 2026

@chriscors is attempting to deploy a commit to the Proof Geist Team on Vercel.

A member of the Team first needs to authorize it.

@chriscors chriscors requested a review from eluce2 March 19, 2026 18:12
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 19, 2026

📝 Walkthrough

Walkthrough

Layout and styling adjustments to the metadata-fields-dialog component. The scroll container height calculation is changed from a percentage-based approach to a fixed viewport-based calculation, and top border styling is removed from the options form container with minor padding adjustment.

Changes

Cohort / File(s) Summary
Metadata Fields Dialog Layout
packages/typegen/web/src/components/metadata-fields-dialog/FieldsDataGrid.tsx, packages/typegen/web/src/components/metadata-fields-dialog/TableOptionsForm.tsx
FieldsDataGrid: Updated scroll container height from height: "100%" to height: "calc(90vh - 280px)" and removed h-full class from DataGridContainer. TableOptionsForm: Removed top border styling (border-border border-t) and adjusted padding from pt-4 to pt-3.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main fix: restoring field rows visibility in the metadata fields dialog by addressing the height calculation issue.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
packages/typegen/web/src/components/metadata-fields-dialog/FieldsDataGrid.tsx (1)

76-83: Extract the scroll-height magic number into named constants.

Line 82 hardcodes 280px, which couples grid height to sibling layout details and can drift as dialog spacing changes. Please replace it with descriptive constants (or a shared CSS variable) to keep this stable and self-documenting.

💡 Suggested refactor
+const METADATA_DIALOG_MAX_HEIGHT_VH = 90;
+const METADATA_DIALOG_RESERVED_HEIGHT_PX = 280;
+const FIELDS_GRID_HEIGHT = `calc(${METADATA_DIALOG_MAX_HEIGHT_VH}vh - ${METADATA_DIALOG_RESERVED_HEIGHT_PX}px)` as const;
...
         <div
           className="overflow-auto"
           ref={tableContainerRef}
           style={{
             contain: "strict",
-            height: "calc(90vh - 280px)", // Adjust based on dialog header and search input height
+            height: FIELDS_GRID_HEIGHT,
           }}
         >

As per coding guidelines, Use meaningful variable names instead of magic numbers - extract constants with descriptive names.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/typegen/web/src/components/metadata-fields-dialog/FieldsDataGrid.tsx`
around lines 76 - 83, Replace the hardcoded "280px" magic number used in the
inline style on the DataGrid container with a named constant or CSS variable:
introduce a descriptive constant (e.g., DIALOG_HEADER_AND_SEARCH_HEIGHT or CSS
var --dialog-header-search-height) and use it inside the height calculation on
the element referenced by tableContainerRef within FieldsDataGrid (the inline
style currently using "calc(90vh - 280px)"). Update any related comments to
reference the constant name and ensure the constant/variable is exported or
defined near the component so future layout changes only require updating that
single symbol.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@packages/typegen/web/src/components/metadata-fields-dialog/FieldsDataGrid.tsx`:
- Around line 76-83: Replace the hardcoded "280px" magic number used in the
inline style on the DataGrid container with a named constant or CSS variable:
introduce a descriptive constant (e.g., DIALOG_HEADER_AND_SEARCH_HEIGHT or CSS
var --dialog-header-search-height) and use it inside the height calculation on
the element referenced by tableContainerRef within FieldsDataGrid (the inline
style currently using "calc(90vh - 280px)"). Update any related comments to
reference the constant name and ensure the constant/variable is exported or
defined near the component so future layout changes only require updating that
single symbol.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b3b23bb0-5cfa-4d18-9ae4-4cf581619756

📥 Commits

Reviewing files that changed from the base of the PR and between fd329e6 and 08b6541.

📒 Files selected for processing (2)
  • packages/typegen/web/src/components/metadata-fields-dialog/FieldsDataGrid.tsx
  • packages/typegen/web/src/components/metadata-fields-dialog/TableOptionsForm.tsx

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 19, 2026

Open in StackBlitz

@proofkit/better-auth

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/better-auth@182

@proofkit/cli

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/cli@182

create-proofkit

pnpm add https://pkg.pr.new/proofgeist/proofkit/create-proofkit@182

@proofkit/fmdapi

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmdapi@182

@proofkit/fmodata

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/fmodata@182

@proofkit/typegen

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/typegen@182

@proofkit/webviewer

pnpm add https://pkg.pr.new/proofgeist/proofkit/@proofkit/webviewer@182

commit: 08b6541

@eluce2
Copy link
Copy Markdown
Collaborator

eluce2 commented Mar 19, 2026

@chriscors Need to add a changeset otherwise this change won't trigger a release

@eluce2 eluce2 merged commit 37bcdab into proofsh:main Mar 19, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants